#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author   : Moty
# @Time     : 2024/1/22 0:11
# @File     : kc16_04.py
# @Project  : jt808
def parse_04_heartbeat_response(body):
    # 解析0x8104 查询终端参数
    data = {
        "桩编码": body[0:14],
        "枪号": body[14:16],
        "心跳应答": body[16:18],
    }
    formatted_data = ""
    for key, value in data.items():
        formatted_data += f"{key}: {value}\n"
    return formatted_data


__all__ = ['parse_04_heartbeat_response']